package com.highspeed.bdk.bean.entity.physical;

import com.bianmaba.spring.data.jpa.domain.annotations.QueryCacheable;
import com.highspeed.bdk.bean.base.IncrementEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

/**
 * @program: bdk-service
 * @description:
 * @author: Chenjiabin
 * @create: 2018-07-04 20:05
 **/
@Entity
@DynamicUpdate(true)
@DynamicInsert(true)
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class LinkFoldPoint extends IncrementEntity {
    private Double leftX;
    private Double leftY;
    private Double rightX;
    private Double rightY;
    @ManyToOne(optional = false)
    @JoinColumn(name = "physical_link_id")
    private PhysicalLink physicalLink;

    public PhysicalLink getPhysicalLink() {
        return physicalLink;
    }

    public void setPhysicalLink(PhysicalLink physicalLink) {
        this.physicalLink = physicalLink;
    }

    public Double getLeftX() {
        return leftX;
    }

    public void setLeftX(Double leftX) {
        this.leftX = leftX;
    }

    public Double getLeftY() {
        return leftY;
    }

    public void setLeftY(Double leftY) {
        this.leftY = leftY;
    }

    public Double getRightX() {
        return rightX;
    }

    public void setRightX(Double rightX) {
        this.rightX = rightX;
    }

    public Double getRightY() {
        return rightY;
    }

    public void setRightY(Double rightY) {
        this.rightY = rightY;
    }
}
